const DEBUG = 'http://192.168.1.153:8082/';
const RELEASE = 'http://api.hubeihxkj.com/';
const PRODUCTION = true;

const HOST = PRODUCTION ? RELEASE : DEBUG;

interface ApiProps {
    HOST: string,
}

const api = {
    /**
     * 主机地址
     */
    HOST,

    oauth: '/oauth',

    //根据登录的用户名获取用户信息
    userInfo: '/api/user/name',

    //用户信息
    userInfoWithId: '/api/user',

    areaList: '/api/area',
    postList: 'api/v1/posts',
    changePassword: 'api/user/password',

    newPost: '/api/posts',
    newGroupPost: '/api/groupPosts',

    commentList: '/api/comment',
    myGroupList: '/api/v1/groups',
    newComment: 'api/comment',

    //删除评论
    deleteComment: 'api/v1/comment',

    postComment: 'api/posts/comment',
    groupPostComment: 'api/groupPosts/comment',

    //离开群组 DELETE userId groupId
    groupLeave: 'api/v1/outGroup',
    groupJoin: 'api/v1/joinGroup',

    //群组帖子列表
    groupPosts: 'api/v1/findGroupPost',

    //图片上传 /api/accessory/upload/{type} type:post groups
    upload: 'api/accessory/upload',


    //点赞 【post帖子,job招聘,postcomment帖子评论的赞，jobcomment招聘评论的赞,group_post群组帖子，grouppost_comment群组帖子评论，eventcomment活动评论的赞】
    praise: 'api/v1/praise',


    //搜索会员圈  get word
    search: 'api/v1/directory',


    //活动列表
    activeList: 'api/v1/findAllActivity',


    //筛选活动列表
    filterActiveList: 'api/v1/findActivityByType',

    //用户参加的活动
    userJoinedActiveList: 'api/v1/findActivityByUser',


    //知名会员
    hotMembers: 'api/v1/hotMembers',
    //活动类型列表 get
    activeTypeList: 'api/activityType',

    //加入或离开活动
    joinActive: 'api/v1/joinActivity',

    //访客相关
    guests: 'api/guest',

    //楼层指南
    questionType: 'api/questionType',


    //社区团队
    areaUser: 'api/v1/findAreaUser',

    //问题相关
    support: 'api/support',


    //是否已经关注某人,并返回此人关注者，关注的人数
    isFollow: 'api/v1/isFollow',

    //关注或者取消关注
    follow: 'api/v1/follow',

    //我的同事
    colleague: 'api/v1/member/colleague',


    //房间列表
    roomList: 'api/rooms',


    //获取单个房间在某天的预定信息
    roomBookedInfo: 'api/rooms/booked',


    //预定房间
    roomReserve: 'api/rooms/reserve',

    //标签相关
    tags: 'api/tags',

    //朋友列表
    chatList: 'api/v1/friendslist',
    //聊天记录列表
    messageList: 'api/basemessage/search',
    //保存聊天记录
    saveMessage: 'api/basemessage',
    //建立好有关系
    contact: 'api/v1/contact',
    //搜索联系人
    searchUser: 'api/v1/findByNickName',

};

export default api;


